<template>
  <div>
    <dt-modal-edit ref="edit" title="设置" :width="900" @ok="onOk" :labelWidth="180"></dt-modal-edit>
  </div>
</template>

<script>
  import editOpt from '../opt/edit.js'
  import apiMgr from '@/biz/bonus/bonusDateConfig.js'

  export default {
    data() {
      return {
        info: {}
      }
    },

    methods: {
      onOk(data) {
        let params = {
          ...data
        }
        apiMgr.updateBoDateSetting(params).then((res) => {
          this.$Message.success('设置成功')
          this.$emit('success')
          this.$refs.edit.hide()
        })
      },
      show(val) {
        this.info = val
        this.$refs.edit.show(new editOpt(this.info), this.info)
      }
    }
  }
</script>

<style lang="scss" scoped>
  ::v-deep .ivu-date-picker-header {
    display: none;
  }
</style>
